package com.vegetable.modules.entity.baseData;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vegetable.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * <p>
 * 自营包装耗材标准
 * </p>
 *
 * @author wangruijie
 * @since 2024-03-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ProductPackMaterial对象", description="自营包装耗材标准")
public class ProductPackMaterial extends BaseEntity {

    @ApiModelProperty(value = "商品id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long producerId;

    @ApiModelProperty(value = "打包材料id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long costClauseId;

    @ApiModelProperty(value = "打包材料名称")
    private String costClauseName;

    @ApiModelProperty(value = "包装规格id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long specsId;

    @ApiModelProperty(value = "规格")
    private String specsName;

    @ApiModelProperty(value = "单价")
    private BigDecimal defaultPrice;

    @ApiModelProperty(value = "数量")
    private BigDecimal num;

    @ApiModelProperty(value = "标签：0材料，1人工")
    private Integer sign;

    @ApiModelProperty(value = "模式：0待办料，1公司料，2班组料")
    private Integer mode;

    @ApiModelProperty(value = "成本归属：0蔬菜成本，1包装成本")
    @TableField(exist = false)
    private Integer packBelong = 1;


}
